package com.itheima.health.mapper;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 这个类是：
 *
 * @author: 25122
 * @date: 2024/6/3 19:47
 * @version: 1.0
 */
@Mapper
public interface CheckGroupAndCheckItemMapper {
    void insert(@Param("ids") Integer[] ids, @Param("checkGroupId") Integer checkGroupId);

    @Select("select health.t_checkgroup_checkitem.checkitem_id from health.t_checkgroup_checkitem where "
            + "checkgroup_id=#{id} ")
    List<Integer> selectByCheckGroupId(Integer id);

    @Delete("delete from health.t_checkgroup_checkitem where checkgroup_id=#{id} ")
    void deleteByCheckGroupId(Integer id);
}
